/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mahumLogs.backedbeans;

import java.util.ArrayList;

/**
 *
 * @author Kalast
 */
public class MonthLog {
    
    
    private int month;
    private String classeCSS;
    private String name;
    private ArrayList<DayLog> days;

    /**
     * 
     * @param month
     * @param name
     * @param classeCSS 
     */
    public MonthLog(int month, String name, String classeCSS) {
        this.days = new ArrayList();
        this.month = month;
        this.name = name;
        this.classeCSS = classeCSS;
    }
    
    /**
     * 
     * @param day 
     */
    public void addDay(int day){
        if(!this.days.contains(new DayLog(this, day))){
            this.days.add(new DayLog(this, day));
        }
    }

    /**
     * 
     * @return name 
     */
    public String getName() {
        return name;
    }

    /**
     * 
     * @param name 
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 
     * @param obj
     * @return 
     */
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final MonthLog other = (MonthLog) obj;
        if (this.month != other.month) {
            return false;
        }
        return true;
    }

    /**
     * 
     * @return days
     */
    public ArrayList<DayLog> getDays() {
        return days;
    }

    /**
     * 
     * @return 
     */
    public int getMonth() {
        return month;
    }

    /**
     * 
     * @param month 
     */
    public void setMonth(int month) {
        this.month = month;
    }

    /**
     * 
     * @return 
     */
    public String getClasseCSS() {
        return classeCSS;
    }

    /**
     * 
     * @param classeCSS 
     */
    public void setClasseCSS(String classeCSS) {
        this.classeCSS = classeCSS;
    }
}
